package cn.crce.cloud9.simple;

import javax.swing.*;

/**
 * @author OnCloud9
 * @description
 * @project NRCE-TEST
 * @date 2022年09月10日 上午 10:17
 */
public class Case33 {
    public static void main(String[] args){
//*********Found**********
        String input = JOptionPane.showInputDialog("你想抽几个数?");
        int k = Integer.parseInt(input);
        input = JOptionPane.showInputDialog("你想在自然数中抽的最大数是几?");
        int n = Integer.parseInt(input);
        int lotteryOdds = 1;
//*********Found**********
        for (int i = 1; i <= k; i++)
            lotteryOdds = lotteryOdds * (n - i + 1)/i;
//*********Found**********
        System.out.println("你中奖的几率是1/" + lotteryOdds + ". Good luck!");
        System.exit(0);
    }
}
